package com.zb.vo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.zb.bean.Role;

public class RoleVo {

    private String id;
    private String name;// 名称
    private String description;// 描述
    private int status;// 状态
    private Date updateTime;// 最后更新时间
    private Date createTime;// 用户创建时间
    
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    public int getStatus() {
        return status;
    }
    public void setStatus(int status) {
        this.status = status;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    
    public RoleVo(Role role) {
        this.id = role.getId();
        this.name = role.getName();
        this.createTime = role.getCreateTime();
        this.updateTime = role.getUpdateTime();
        this.status = role.getStatus();
        this.description = role.getDescription();
    }
    
    public static List<RoleVo> buildList(List<Role> result) {
        List<RoleVo> roleVos = new ArrayList<RoleVo>();
        for(Role role : result) {
            roleVos.add(new RoleVo(role));
        }
        return roleVos;
    }
    
}
